/*
 * File: J_la_T04_q2.c
 *
 * MATLAB Coder version            : 5.2
 * C/C++ source code generated on  : 23-Apr-2025 08:33:43
 */

/* Include Files */
#include "J_la_T04_q2.h"
#include <math.h>

/* Function Definitions */
/*
 * J_LA_T04_Q2
 *     U42 = J_LA_T04_Q2(IN1,IN2)
 *
 * Arguments    : const double in1[5]
 *                const double in2[5]
 *                double u42[16]
 * Return Type  : void
 */
void J_la_T04_q2(const double in1[5], const double in2[5], double u42[16])
{
  double t10;
  double t11;
  double t12;
  double t13;
  double t14;
  double t15;
  double t16;
  double t17;
  double t18;
  double t19;
  double t2;
  double t20;
  double t22;
  double t24;
  double t25;
  double t29;
  double t3;
  double t30;
  double t32;
  double t38;
  double t39;
  double t4;
  double t45;
  double t5;
  double t6;
  double t61;
  double t62;
  double t7;
  double t8;
  double t9;
  /*     This function was generated by the Symbolic Math Toolbox version 8.7.
   */
  /*     09-Apr-2025 18:11:46 */
  t2 = cos(in2[0]);
  t3 = cos(in2[1]);
  t4 = cos(in2[2]);
  t5 = cos(in2[3]);
  t6 = cos(in1[0]);
  t7 = cos(in1[1]);
  t8 = cos(in1[2]);
  t9 = cos(in1[3]);
  t10 = sin(in2[0]);
  t11 = sin(in2[1]);
  t12 = sin(in2[2]);
  t13 = sin(in2[3]);
  t14 = sin(in1[0]);
  t15 = sin(in1[1]);
  t16 = sin(in1[2]);
  t17 = sin(in1[3]);
  t18 = t6 * t7;
  t19 = t6 * t15;
  t61 = t2 * t7;
  t20 = t61 * t11;
  t22 = t3 * t7 * t14;
  t6 = t7 * t10;
  t24 = t6 * t11;
  t25 = t2 * t14 * t15;
  t29 = t10 * t14 * t15;
  t62 = t2 * t3;
  t30 = t62 * t18;
  t7 = t3 * t10;
  t32 = t7 * t18;
  t38 = t19 + t22;
  t39 = t18 + -(t3 * t14 * t15);
  t45 = (t2 * t11 * t15 + t6 * t14) + t7 * t19;
  t3 = (t20 + t32) + -t29;
  t10 = (t61 * t14 + t62 * t19) + -(t10 * t11 * t15);
  t18 = (t24 + t25) + -t30;
  t6 = t4 * t16;
  t11 = t8 * t38 + t6 * t39;
  t7 = t4 * t8;
  t61 = t16 * t3 + t7 * t45;
  t2 = t16 * t38 + -(t7 * t39);
  t62 = t8 * t18 + t6 * t10;
  t3 = t8 * t3 + -(t6 * t45);
  t6 = t16 * t18 + -(t7 * t10);
  t7 = t5 * t17;
  t18 = t12 * t13 * t17;
  u42[0] = (-t9 * t11 + t7 * t2) + t18 * t39;
  u42[1] = (-t9 * t62 + t7 * t6) + t18 * t10;
  u42[2] = (t9 * t3 - t7 * t61) + t18 * t45;
  u42[3] = 0.0;
  t7 = t5 * t9;
  t18 = t9 * t12 * t13;
  u42[4] = (t17 * t11 + t7 * t2) + t18 * t39;
  u42[5] = (t17 * t62 + t7 * t6) + t18 * t10;
  u42[6] = (-t17 * t3 - t7 * t61) + t18 * t45;
  u42[7] = 0.0;
  t7 = t5 * t12;
  u42[8] = -t13 * t2 + t7 * t39;
  u42[9] = -t13 * t6 + t7 * t10;
  u42[10] = t13 * t61 + t7 * t45;
  u42[11] = 0.0;
  u42[12] = (t19 * -0.01491 - t22 * 0.01491) + t12 * t39 * 0.27898;
  u42[13] =
      ((t24 * -0.01491 - t25 * 0.01491) + t30 * 0.01491) + t12 * t10 * 0.27898;
  u42[14] =
      ((t20 * 0.01491 - t29 * 0.01491) + t32 * 0.01491) + t12 * t45 * 0.27898;
  u42[15] = 0.0;
}

/*
 * File trailer for J_la_T04_q2.c
 *
 * [EOF]
 */
